#pragma once
#include "cybertron/DefinesCore.hpp"
#include <atomic>
#include <string>
#include "cybertron/node/NodeHotAreaManager.hpp"
#include "cybertron/sensor/noise/IMUNoiseMaker.hpp"
#include "TaskHotAreaBase.hpp"
#include "SimOneIOStruct.h"
using namespace cybertron;


class CTaskObstacle :public CTaskHotAreaBase
{
public:

	CTaskObstacle();
	virtual ~CTaskObstacle();
	virtual void HotAreaEnter();
	virtual void HotAreaLeft(int frame, int ms, int msModNs, TrafficActorHotArea* pHotArea);
	virtual void ActorToDo(int hostVehicleId, int frame, int ms, int msModNs, TrafficActorHotArea* pHotArea, TrafficActor* pActor, int index) override;
	virtual char* GetResult(std::string hostVehicleId) override;
	virtual int GetHotAreaDataLength(std::string hostVehicleId) override;
	virtual void Clear() override;
	virtual EIOTaskType GetTaskType() { return TaskTypeObstacle; }
protected:
	SimOne_Data_Obstacle mLastBridgeObstacleInfo;
	typedef map<std::string, SimOne_Data_Obstacle> SimOne_Data_ObstacleMap;
	SimOne_Data_ObstacleMap mLastObstacleMap;
};